package com.siyu.tickets.entity.base;

import java.io.Serializable;

public abstract class BaseAdminUser implements Serializable {

	private static final long serialVersionUID = -2804510946722484980L;

	public static String REF = "AdminUser";

	// constructors
	public BaseAdminUser() {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAdminUser(java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAdminUser(java.lang.Integer id, java.lang.String idCard, java.lang.String gender,
			com.siyu.tickets.entity.SysUser user) {
		this.setId(id);
		this.setIdCard(idCard);
		this.setGender(gender);
		this.setUser(user);
		initialize();
	}

	protected void initialize() {
	}

	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String idCard;
	private java.lang.String gender;
	private java.lang.String mobile;
	private java.lang.String qq;

	// one to one
	private com.siyu.tickets.entity.SysUser user;

	// collections
	private java.util.Set<com.siyu.core.entity.SysLoginLog> loginLogs;

	/**
	 * Return the unique identifier of this class
	 * 
	 * @hibernate.id generator-class="assigned" column="user_id"
	 */
	public java.lang.Integer getId() {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * 
	 * @param id
	 *            the new ID
	 */
	public void setId(java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}

	public java.lang.String getIdCard() {
		return idCard;
	}

	public void setIdCard(java.lang.String idCard) {
		this.idCard = idCard;
	}

	public java.lang.String getGender() {
		return gender;
	}

	public void setGender(java.lang.String gender) {
		this.gender = gender;
	}

	public java.lang.String getMobile() {
		return mobile;
	}

	public void setMobile(java.lang.String mobile) {
		this.mobile = mobile;
	}

	public java.lang.String getQq() {
		return qq;
	}

	public void setQq(java.lang.String qq) {
		this.qq = qq;
	}

	public com.siyu.tickets.entity.SysUser getUser() {
		return user;
	}

	public void setUser(com.siyu.tickets.entity.SysUser user) {
		this.user = user;
	}

	public java.util.Set<com.siyu.core.entity.SysLoginLog> getLoginLogs() {
		return loginLogs;
	}

	public void setLoginLogs(java.util.Set<com.siyu.core.entity.SysLoginLog> loginLogs) {
		this.loginLogs = loginLogs;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof com.siyu.tickets.entity.AdminUser))
			return false;
		else {
			com.siyu.tickets.entity.AdminUser user = (com.siyu.tickets.entity.AdminUser) obj;
			if (null == this.getId() || null == user.getId())
				return false;
			else
				return (this.getId().equals(user.getId()));
		}
	}

	public int hashCode() {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId())
				return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

	public String toString() {
		return super.toString();
	}

}